import request from '@/utils/request'

// 查询项目-个人用户列表（不分页）
export function listProjectUser(query) {
    return request({
        url: '/app-api/business/projectUser/list',
        method: 'get',
        params: query
    })
}

// 查询项目-个人用户列表（分页）
export function pageListProjectUser(query) {
    return request({
        url: '/app-api/business/projectUser/page/list',
        method: 'get',
        params: query
    })
}

// 新增项目-个人用户
export function addProjectUser(data) {
    return request({
        url: '/app-api/business/projectUser',
        method: 'post',
        data: data
    })
}

// 删除项目-个人用户
export function delProjectUser(data) {
    return request({
        url: '/app-api/business/projectUser',
        method: 'delete',
        data: data
    })
}

/**
 * 添加报警人员
 */
export function addNotice(userIds) {
    return request({
        url: `/app-api/business/projectUser/add/notice/${userIds}`,
        method: 'put'
    })
}

/**
 * 取消报警人员
 */
export function cancelNotice(userIds) {
    return request({
        url: `/app-api/business/projectUser/cancel/notice/${userIds}`,
        method: 'put'
    })
}
